package com.yangj.entity;

import com.thoughtworks.xstream.annotations.*;
import java.util.*;

public class BaseMessage
{
    @XStreamAlias("ToUserName")
    private String toUserName;
    @XStreamAlias("FromUserName")
    private String fromUserName;
    @XStreamAlias("CreateTime")
    private String createTime;
    @XStreamAlias("MsgType")
    private String msgType;
    
    public String getToUserName() {
        return this.toUserName;
    }
    
    public void setToUserName(final String toUserName) {
        this.toUserName = toUserName;
    }
    
    public String getFromUserName() {
        return this.fromUserName;
    }
    
    public void setFromUserName(final String fromUserName) {
        this.fromUserName = fromUserName;
    }
    
    public String getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(final String createTime) {
        this.createTime = createTime;
    }
    
    public String getMsgType() {
        return this.msgType;
    }
    
    public void setMsgType(final String msgType) {
        this.msgType = msgType;
    }
    
    public BaseMessage(final Map<String, String> requestMap) {
        this.toUserName = requestMap.get("ToUserName");
        this.createTime = new StringBuilder(String.valueOf(System.currentTimeMillis() / 1000L)).toString();
        this.fromUserName = requestMap.get("FromUserName");
    }
}
